<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
<%@ taglib prefix ="spring" uri = "http://www.springframework.org/tags" %>
<%@ taglib uri="/WEB-INF/out-tabs.tld" prefix="out" %>
<head>
<script type="text/javascript">
		window.markers = new Array();
</script>
<c:forEach items="${response.results}" var="event">	
	<script type="text/javascript">
		window.markers.push({lat:'${event.place.lat}', lng:'${event.place.lng}',title:'${event.title}'});
	</script>
</c:forEach>
</head>
<jsp:include page="categorize.jsp"></jsp:include>
<c:if test="${response != null && fn:length(response.results) > 0}">
	<out:pagination paginatedResult="${response}" ></out:pagination>
	<c:forEach items="${response.results}" var="event">
		<c:url value="/image/80/80/${event.picture}" var="img_src"/>
		<div class="event form_row">
			<div class="flyer"><img src="${img_src}"/></div>
			<div class="title_container">
				<div><a class="title" href="<c:url value="/event/${event.id}"/>">${event.title}</a></div>
				<div class="subtitle">${event.subtitle}</div>
			</div>
			<div class="data"><span class="label"><spring:message code="label.date"/>: </span><span><out:dates dateRanges="${event.dates}" isVirtual="${event.virtual}" timezoneId="${event.timezone}" includeTime="true"></out:dates></span></div>
			<div class="data"><span class="label"><spring:message code="label.where"/>: </span><span>${event.place.name}</span><span>(${event.place.address})</span></div>
		</div>
	</c:forEach>
</c:if>